/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.braincasedesigns.roller.util;

import com.braincasedesigns.roller.factory.DieFactoryImpl;
import com.braincasedesigns.roller.factory.DieFactory;
//import com.braincasedesigns.roller.server.DiceServerController;
//import java.util.ServiceLoader;

/**
 *
 * @author jcampbel
 */
public class ServiceLocator {
    
    private static ServiceLocator instance = new ServiceLocator();
    
    
    //This really should use Java's ServiceLoader... but it's not available in 5.
    //private static ServiceLoader<DieFactory> dieFactoryLoader = ServiceLoader.load(DieFactory.class);

    
    private final DieFactory dieFactory = new DieFactoryImpl();


    private ServiceLocator(){
    }
    
    public static ServiceLocator getInstance(){
        return instance;
    }
    
    public DieFactory getDieFactory(){
        return dieFactory;
    }

}
